The following RegEx extract the hour from a 24H time format string like HH:mm (09:30), HH (09), or H (9). ────────────── Explanation: • \b: Word boundary to ensure we capture only complete numbers, not parts of larger numbers. • (?:...): Non-capturing group to match the following alternatives without creating a capture group. • [01]\d: Matches hours from 0 to 19. • 2[0-3]: Matches hours from 20 to 23. • (?=:|$): Lookahead to ensure the hour is followed by a colon : (like in HH:mm) or the end of the string (like in H or HH).
DateActionDate
:
[Shortcut Input]:00

DateFormatStyle
:
Custom
DateFormat
:
H

MatchTextCaseSensitive
:
false
半夜
Date
:
[? 00:00]
NumberValue
:
4
AnotherNumber
:
10
AnotherDate
:
[? 12:00]
早上
中午
Date
:
[? 12:00]
NumberValue
:
13
AnotherNumber
:
16
AnotherDate
:
[? 18:00]
下午
Date
:
[? 12:00]
NumberValue
:
17
AnotherNumber
:
18
AnotherDate
:
[? 18:00]
傍晚
晚上
DateFormatStyle
:
Custom
DateFormat
:
hh:mm
DateFormatStyle
:
Custom
DateFormat
:
h:mm
DateActionDate
:
[Shortcut Input]:00

DateFormatStyle
:
Custom
DateFormat
:
h